import http from "@/utils/request"
//下载人工记录
export function getAllexportData() {
  return http({
    url: `/breed/cage/exportData`,
    method: 'get',
    responseType: 'blob',
    header: {
      headers: { 'Content-Type': 'application/x-download' }
    },
  });
}

// 获取鸽棚信息
export function getAllDovecote(pageNum,pageSize,params) {
  return http({
    url: `/breed/dovecote/list/${pageNum}/${pageSize}`,
    method: 'get',
    params
  });
}

// 获取鸽棚对应鸽笼信息
export function getAllCage(pageNum,pageSize,params) {
  return http({
    url: `/breed/cage-real/getAllDove/${pageNum}/${pageSize}`,
    method: 'get',
    params
  });
}
// console.log('调用',getAllCage(1,10))

//筛选鸽笼状态
export function chooseCageData(params) {
  return http({
    url: `/breed/cage-real/getCageOfDiffState`,
    method: 'get',
    params
  });
}

//获取鸽棚状态数量
export function getCageCount(params) {
  return http({
    url: `/breed/dovecote/getAmountOfState`,
    method: 'get',
    params
  });
}
//获取今日需要抽蛋的数量
export function getNeedTakeEggs(params) {
  return http({
    url: `/breed/dovecote/getNeedTakeEggs`,
    method: 'get',
    params
  });
}

//获取今日需要照蛋的数量
export function getNeedPictureEgg(params) {
    return http({
      url: `/breed/dovecote/getNeedPictureEgg`,
      method: 'get',
      params
    });
  }

//获取今日需要查仔的数量
export function getNeedCheckDoves(params) {
  return http({
    url: `/breed/dovecote/getNeedCheckDoves`,
    method: 'get',
    params
  });
}

//获取昨日垫蛋数量
export function getMatEggsOfYesterday(params) {
  return http({
    url: `/breed/dovecote/getMatEggsOfYesterday`,
    method: 'get',
    params
  });
}

//获取昨日异常数量
export function getAbnormalVoOfYesterday(params) {
  return http({
    url: `/breed/dovecote/getAbnormalVoOfYesterday`,
    method: 'get',
    params
  });
}

//获取鸽棚详情信息
export function getDovecoteDetails(id) {
  return http({
    url: `/breed/dovecote/get/${id}`,
    method: 'get'
  });
}

// 根据鸽笼位置获取鸽笼信息
export function getCageId(data) {
  return http({
    url: `/breed/cage-position/getCageId?baseId=${data.baseId}&dovecoteNumber=${data.dovecoteNumber}&rowNo=${data.rowNo}&line=${data.line}&columnNo=${data.columnNo}`,
    method: 'post',
  });
}

// 根据鸽笼位置获取鸽笼信息
export function getStateByCageId(id) {
  return http({
    url: `/breed/cage-real/getStateByCageId?cageId=${id}`,
    method: 'get'
  });
}